package com.java.controller.center;

import com.java.common.utils.R;
import com.java.pojo.Users;
import com.java.service.center.CenterUsersService;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jl
 * Created on 2020/10/19
 */
@Api(tags = "用户中心")
@RestController
@RequestMapping("/center")
@AllArgsConstructor
public class CenterController {
    private final CenterUsersService centerUsersService;


    @GetMapping("/userInfo")
    public R userInfo(@RequestParam String userId) {
        Users user = centerUsersService.queryUserByUserId(userId);
        return R.ok(user);
    }
}
